<?php 

/**
 * Source code under Creative Commons License 
 * (see LICENSE FILE)
 *
 * Copyright (c) 2013 Maelstrom.
 * All rights reserved.
 *
 *
 * @author      Maelstrom <devcreamframework@gmail.com>
 * @copyright   2012 Maelstrom.
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @link        https://github.com/maelstromkd/cream-dev.git
 * @version     1.2
 */

require realpath(dirname(__FILE__)) . '/../../core/paths.php';
require realpath(dirname(__FILE__)) . '/../../core/solidMysql.php';

$query 	= 'select count(`id`) as `count` from `mailinglist` where `status`=1';
$result = mysql_query($query);
if($result){
	$rs = mysql_fetch_assoc($result);
	$current = $rs['count'];
	unset($rs);
}
unset($query,$result);

$query = 'select count(`id`) as `count` from `mailinglist`';
$result = mysql_query($query);
if($result){
	$rs 	= mysql_fetch_assoc($result);
	$total 	= $rs['count'];
	unset($rs);
}
unset($query,$result);

echo $current . '|' . $total . '|' . round(($current/$total)*100) . '|' . file_get_contents(__NCONTROL__) . '|'  . $current . '/' . $total;

mysql_close();
